<?php

use App\Admin\Controller\Base\RoleController;
use App\Common\Util\TP;
use Sc\Util\HtmlStructure\Form;
use Sc\Util\HtmlStructure\Form\FormItem;
use Sc\Util\HtmlStructure\Html\Html;


Html::create('添加管理员角色');

$form = Form::create('roleFormupdate')->config('label-width', '80px');

$form->addFormItems(
    FormItem::hidden('id', 'ID'),
    FormItem::text('name', '角色'),
    FormItem::textarea('describe', '描述'),
    FormItem::submit()->successClose('current')->submitUrl(
        TP::route()->to([RoleController::class, 'store'])->url(),
        TP::route()->to([RoleController::class, 'update'])->url(),
    )->success('VueApp.roleGetData()')
);

return $form->render();